<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>留学生管理系统</title>
        <link rel="stylesheet" href="${path}/css/admin2.css">
        <script>
            var _current_item = "#scoreRecord";
        </script>
        <script type="text/javascript" src="${path}/js/jquery.min.js"></script>
    </head>
    <body>
        ${session.message!}
        <!--header-->
        <div id="header"></div>
        <div id="main">
            <div id="side-menu"></div>
            <div id="container">
                <div id="inner-border">

                    <!-- <div class="gr1">
                        <span class="gr2">学期</span>
                    <div class="gr3">
                        <select class="gr5">
                            <option>&nbsp;全部</option>
                            <option>&nbsp;2014/2015(1)</option>
                            <option>&nbsp;2014/2015(2)</option>
                            <option>&nbsp;2015/2016(1)</option>
                            <option>&nbsp;2015/2016(2)</option>
                        </select>
                    </div>
                    <button type="submit" class="form-group btn btn-primary btn-sm gr4">确认</button>	
                    </div> -->

                    <div class="table3">
                        <div style="padding-bottom: 35px;">${noCourse!}</div>
                        <table class="table table-bordered" id="table">
                            <thead>
                                <tr>
                                	<th>学期</th>
                                    <th>课程名</th> 
                                    <th>考试类型</th>
                                    <th>截止日期</th>
                                    <th>状态</th>
                                    <th>操作</th> 
                                </tr>
                            </thead>
                            <tbody>
                                <#if course?exists>
                                <#list course as r>
                                <tr>
									<td>${r.termValue!}</td>
                                    <td><a href="${path}/teaScoreInput/gradeSelected?testNo=${r.testNo}">${r.courseName!}</a></td> 
									<td>
										<#if r.testType.equals("1") >正考</#if>
										<#if r.testType.equals("2") >补考</#if>
									</td>
                                    <td>${r.endDate!}</td>
                                    <td>
                                    <#if r.testLock.equals("0")>未录入</#if>
                                    <#if r.testLock.equals("3")>保存</#if>
                                    <#if r.testLock.equals("1")>提交</#if>
                                    <#if r.testLock.equals("2")>超时未录入</#if>
                                    </td>
                                    <td>
                                   		 <#if r.testLock.equals("1") && r.testType.equals("1")>
                                        <form action="${path}/teaScoreInput/exportGrade" method="post">
                                            <input type="hidden" value="${r.testNo!}" name="testNo" />	
                                            <button type="submit" >导出成绩</button>
                                        </form> 
                                        </#if>
                                        <#if !r.testLock.equals("1") && r.testType.equals("1")>
                                        <form action="${path}/teaScoreInput/exportGrade" method="post">
                                            <input type="hidden" value="${r.testNo!}" name="testNo" />	
                                            <button type="submit" disabled class="disabled" >导出成绩</button>
                                        </form>
                                        </#if >
                                        <#if r.testLock.equals("1") && r.testType.equals("2")>
                                        <form action="${path}/teaScoreInput/exportReplace" method="post">
                                            <input type="hidden" value="${r.testNo!}" name="testNo" />	
                                            <button type="submit" >导出成绩</button>
                                        </form> 
                                        </#if>
                                        <#if !r.testLock.equals("1") && r.testType.equals("2")>
                                        <form action="${path}/teaScoreInput/exportReplace" method="post">
                                            <input type="hidden" value="${r.testNo!}" name="testNo" />	
                                            <button type="submit" disabled class="disabled" >导出成绩</button>
                                        </form>
                                        </#if >
                                       <!--  <button class="btn" testNo=${r.testNo!}>导出成绩</button> -->
                                    </td>
                                </tr>
                                </#list>
                                </#if>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>  
                <div id="footer"></div>
        
        <div id="footer"></div>
        <script type="text/javascript" src="${path}/js/teacher-main-appearance.js"></script>
        	<!-- DataTables JavaScript -->
        <script src="${path}/bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
        <script src="${path}/bower_components/datatables-plugins/api/fnGetHiddenNodes.js"></script>
        <script src="${path}/bower_components/datatables-plugins/api/fnGetTd.js"></script>
        <script src="${path}/bower_components/datatables-plugins/api/fnGetTds.js"></script>
        <script src="${path}/bower_components/datatables-plugins/api/fnGetColumnData.js"></script>
        <script src="${path}/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                $('#table').DataTable({
                    responsive: true,
                    "bRetrieve": true,
                    "bFilter": true//过滤功能
                });
            });
            /* $(document).on("click",".btn",function(){
            	exportGrade(this);
            });
            function exportGrade(node){
            alert(111111111);
            	 $.ajax({
           			type:"post",
                    url:'${path}/teaScoreInput/exportGrade',
                    data:{
                    },
                    datatype:"text",
                    success:function(data){
                        alert("success");
                    }
            });
            	
            } */
        </script>
    </body>
</html>
